<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_resource_file".
 *
 * @property string $id id
 * @property string $create_by 创建人
 * @property string $name 文件名
 * @property string $uri
 * @property string $b_uri
 * @property string $mime mime类型
 * @property string $play_time 视频播放时长
 * @property string $size 文件大小
 * @property string $status 状态
 * @property string $create_time 创建时间
 * @property string $type 文件类型
 * @property string $cdn_key cdn系统key
 * @property int $del_flag 删除标示
 * @property string $format_flag 用于标注文件的格式。
 * @property string $old_id 对应3.0文件id
 */
class TResourceFile extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_resource_file';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'name', 'create_time'], 'required'],
            [['uri', 'b_uri'], 'string'],
            [['size', 'del_flag'], 'integer'],
            [['create_time'], 'safe'],
            [['id', 'create_by', 'old_id'], 'string', 'max' => 36],
            [['name', 'mime', 'play_time', 'cdn_key', 'format_flag'], 'string', 'max' => 255],
            [['status', 'type'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'create_by' => 'Create By',
            'name' => 'Name',
            'uri' => 'Uri',
            'b_uri' => 'B Uri',
            'mime' => 'Mime',
            'play_time' => 'Play Time',
            'size' => 'Size',
            'status' => 'Status',
            'create_time' => 'Create Time',
            'type' => 'Type',
            'cdn_key' => 'Cdn Key',
            'del_flag' => 'Del Flag',
            'format_flag' => 'Format Flag',
            'old_id' => 'Old ID',
        ];
    }
}
